<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import { getAllClass } from '@/api/public'
export default {
  name: 'App',
  computed: {
    ...mapGetters(['name'])
  },
  async created() {
    const result = await getAllClass()
    if (result.code === 1) {
      this.$store.dispatch('setAllClass', result.data)
    }
  }
}
</script>
